using Microsoft.AspNetCore.Mvc;
using Project_Schedule.Domain.BackGround.com.core.dto;
using Project_Schedule.Domain.BackGround.com.core.Interface;
using Project_Schedule.Domain.Request;

namespace Project_Schedule.Domain.BackGround.com.core.Controller;

[ApiController]
[Route("api/[controller]/[action]")]
public class BackgroundRegisterController : ControllerBase
{
    private readonly IBackgroundRegister _backgroundRegister;

    public BackgroundRegisterController(IBackgroundRegister backgroundRegister)
    {
        _backgroundRegister = backgroundRegister;
    }

    [HttpPost]
    public async Task<JRequest> Register(BackgroundRegister dto)
    {
        return await _backgroundRegister.BgRegister(dto);
    }
}